<!-- 添加订单成功 -->
<div id="addorder" style="width:25%;z-index:999;position:fixed;top:30%;left:40%;border-radius: 16px;box-shadow: 0 0 6px 3px rgba(0,0,0,.15);padding: 10px 20px;background-color: #e8edef;display:none;">
    <style type="text/css">
        .successfullyfrom-close-r{float:right}
        .successfullyfrom-close-r button{border:none;background-color: #FDD702;color:black;font-weight:bold;border-radius:5px;cursor:pointer;font-size:16px;padding:3px 6px;border-radius: 5px;}
        .successfullyfrom-close-r button:hover{background-color:#36648a;color:#ffffff}
        .successfullyfrom-close-b{padding:10px 12px;}
        .successfullyfrom-close-b button{border:none;background-color: #FDD702;color:black;font-weight:bold;border-radius:5px;cursor:pointer;font-size:16px;padding:5px 10px;border-radius: 5px;}
        .successfullyfrom-close-b button:hover{background-color:#36648a;color:#ffffff}
    </style>
    <div  class="successfullyfrom-close-r"><button type="button" onclick="close_successfullyfrom()">X</button></div>
    <h2 style="font-size:30px;color:#36648a;padding:20px 10px;line-height:32px;">Order Prompt</h2>
    <div style="font-size:16px;color:#79858e;padding:10px;line-height:20px;">The order is added successfully. You can click <a href="/order/">order</a> to pay or view</div>
    <div class="successfullyfrom-close-b"><button type="button" onclick="close_successfullyfrom()">close</button></div>
</div>
<!-- 脚部 -->
<style>
  @media screen and (min-width: 768px) {
    .zh-icon:hover .QRcode{
      display:block;
    }
  }
  .QRcode{
    width: 130px;  
    position: absolute;
    z-index: 99;
    display:none;
  }
  .zh-buttom-img{
    display: flex;
  }
  .zh-icon{
    margin: 0 5px;
  }
  .zh-icon a>img, .zh-icon>img{
    width: 80%;
    border-radius: 25%;
    aspect-ratio:1/1; 
    object-fit:contain;
  }
  .QRcode img{
    width: 80%;
  }
</style>
<footer>
 
  <div class="layui-container">
      <!-- 底部成功后弹出框 -->
      <div id="successfullyfrom_footer" style="width:25%;z-index:999;position:fixed;top:30%;left:40%;border-radius: 16px;box-shadow: 0 0 6px 3px rgba(0,0,0,.15);padding: 10px 20px;background-color: #e8edef;display: none;">
          <style type="text/css">
              .successfullyfrom-close-r{float:right}
              .successfullyfrom-close-r button{border:1px solid #36648a;cursor:pointer;font-size:16px;padding:3px 6px;color:#36648a;border-radius: 5px;}
              .successfullyfrom-close-r button:hover{border:1px solid #ffffff;color:#ffffff}
              .successfullyfrom-close-b{padding:10px 12px;}
              .successfullyfrom-close-b button{border:1px solid #36648a;cursor:pointer;font-size:16px;padding:5px 10px;color:#36648a;border-radius: 5px;}
              .successfullyfrom-close-b button:hover{background-color:#36648a;color:#ffffff}
              @media screen and (max-width: 760px) {
                .layui-form-phone{display: none;}
                .fayoujian{display: none;}
              }
          </style>
          <div  class="successfullyfrom-close-r"><button type="button" onclick="close_successfullyfrom_footer()">X</button></div>
          <h2 style="font-size:30px;color:#36648a;padding:20px 10px;line-height:32px;">{:lang('Submitted')}</h2>
          <div style="font-size:16px;color:#79858e;padding:10px;line-height:20px;">{:lang('Thank you for reaching out.')}</div>
          <div class="successfullyfrom-close-b"><button type="button" onclick="close_successfullyfrom_footer()">{:lang('close')}</button></div>
      </div>
    <div class="layui-row footer-box">

      <div class="layui-col-sm5" style="padding-right:10px">

          <div class="layui-col-sm2 logo footer-logo">

            <a href="/"><img src="{:Config::get('app.images_host')}/images/web/logo.png" alt="logo" style="width:100%; aspect-ratio:4/3; object-fit:contain;"/></a>

          </div>

          <div class="layui-col-sm7" style="padding:10px 0px">

            <p style="font: 12px/14px arial,helvetica,sans-serif;line-height:24px;letter-spacing:1px">Address: Room 301, 6st Block, #525 Yuanjiang Road, Minhang District, Shanghai, China</p>

            <p style="font: 12px/14px arial,helvetica,sans-serif;line-height:24px;letter-spacing:1px">Email: <a class='email' href="mailto:lilybearing@lily-bearing.com">lilybearing@lily-bearing.com</a></p>

          </div>

          <div class="layui-col-sm3 footer-img-box" style="padding:15px 10px 10px 10px">
            <div class="layui-col-sm3">

              <a class="facebook" style="text-align:center;" href="https://www.facebook.com/lilybearingmanufacturing" target="_blank"><img style="width:100%; aspect-ratio:4/3; object-fit:contain;" src="{:Config::get('app.images_host')}/images/web/facebook.png" alt="facebook"/></a>

            </div>

            <div class="layui-col-sm3">

              <a class="linkedin" style="text-align:center;" href="https://www.linkedin.com/company/lily-bearing-manufacturing" target="_blank"><img style="width:100%; aspect-ratio:4/3; object-fit:contain;" src="{:Config::get('app.images_host')}/images/web/linkedin.png" alt="linkedin"/></a>

            </div>

            <div class="layui-col-sm3">

              <a class="twitter" style="text-align:center;" href="https://twitter.com/LilyBearingSh" target="_blank"><img style="width:100%; aspect-ratio:4/3; object-fit:contain;" src="{:Config::get('app.images_host')}/images/web/twitter.png" alt="twitter"/></a>

            </div>

            <div class="layui-col-sm3">

              <a class="youtube" style="text-align:center;" href="https://www.youtube.com/channel/UCFye_8J4Hbi1q3jS1U6YDrg" target="_blank"><img style="width:100%; aspect-ratio:4/3; object-fit:contain;" src="{:Config::get('app.images_host')}/images/web/youtube.png" alt="youtube"/></a>

            </div>
            
          </div>

          <div class="layui-col-sm12 footer-font" style="padding-bottom: 10px">

            <p style="font: 12px/14px arial,helvetica,sans-serif;line-height:24px;letter-spacing:1px">Creating value for customers is our core. Using this concept when serving customers, we will considering from the perspective of customers, rather than simply selling products. We provide customers with advanced services such as designing, model selection, pre-sales and after-sales services, using our professional knowledge and experiences in bearing industry over 20 years.</p>

          </div>  

        

      </div>
        <div class="layui-col-sm5" style="padding-right:10px;">
            <div class="layui-form-phone" >
                <div style='float:right;width:97%'>
                    <div class="layui-form">
                        <style type="text/css">
                            .layui-col-sm4{
                                position: static
                            }
                        </style>
                        <div class="layui-col-sm12" style="padding: 10px 10px">
                            <div style="float:left;width:20%;height: 20px;line-height: 20px;color: white;">Name<span style="color:white;font-size:18px">*</span>:</div>
                            <div class="layui-input-block" style="float:left;width:40%;height:20px">
                                <input type="text" name="footer_name" id="footer_name" autocomplete="off" class="layui-input" />
                            </div>
                        </div>
                        <div class="layui-col-sm12" style="padding: 10px 10px">
                            <div style="float:left;width:20%;height: 20px;line-height: 20px;color: white;">Email<span style="color:white;font-size:18px">*</span>:</div>
                            <div class="layui-input-block" style="float:left;width:40%;height:20px">
                                <input type="text" name="footer_email" id="footer_email" autocomplete="off" class="layui-input" />
                            </div>
                           
                        </div>
                        <div class="layui-col-sm12" style="padding: 10px 10px">

                            <div style="float:left;width:20%;height: 20px;line-height: 20px;color: white;">Phone<span
                                    style="color:white;font-size:18px">*</span>:</div>
                            <div class="layui-input-block" style="float:left;width:40%;height:20px">
                                <input type="text" name="footer_phone" id="footer_phone" autocomplete="off"
                                       class="layui-input" />
                            </div>

                        </div>


                        <div class="layui-col-sm12" style="padding: 10px 10px">
                            <div class="phone-comments" style="float:left;width:20%;height: 20px;line-height: 20px;color: white;">Comments</div>
                            <div class="layui-input-block phone-comments-input" style="float:left;width:60%;">
                                <textarea name="footer_comments" class="layui-textarea"></textarea>
                            </div>
                            <div class="layui-input-block button" style="float:left;margin-top: 40px;">
                                <button id='gform_submit_button_6' class="layui-btn btn " lay-filter="footer_formDemo"
                                        lay-submit type='button' style="color:black;background-color: #FDD702;font-weight: bold;border-radius: 5px;height: 30px;line-height: 30px;padding: 0 10px;">Submit</button>
                            </div>
                        </div>
                        <div class="layui-col-sm12 code-button-box" style="padding: 10px 10px">
                            <!-- 验证码 2-->
                            <?php if($base_data['is_show_code']==true){?>
                            <div class="layui-form-item" id="code_div">
                                <div class="verification-code">
                                    <div style="float:left;width:20%;height: 20px;line-height: 20px;color: white;">code<span style="color:white;font-size:18px">*</span>:</div>
                                    <div class="layui-input-block" style="float:left;">
                                        <input class="verification-code-input layui-input" type="text" name="footer_code" style="float:left;width:80%;height:40px;padding: 6px 20px;"/>
                                    </div>
                                    <div class="verification-code-img">
                                        <img src="{:url('index/xunpan/verify')}" style="margin-top: -7px;width: 30%;" id="code_img" onclick="this.src=this.src.split('?')[0] + '?'+new Date().getTime()" title="Click to change one" >
                                    </div>
                                </div>
                            </div>
                            <?php } ?>
                        </div>
                        <div class="layui-col-sm12 code-button" style="padding: 0px 10px">

                    </div>
                    </div>
                </div>
            </div>
        </div>

      <div class="layui-col-sm2 footer-link" style="padding-bottom:10px">

        <div>

          <h2 style="font: 18px arial,helvetica,sans-serif;">Quick Links</h2>

          <ul>

            <li style="padding-top:5px">

              <i class="layui-icon layui-icon-next" style="font-size:12px"></i>

              <a href="/about-us/" style="font: 12px/14px arial,helvetica,sans-serif;line-height:14px;color:#ffffff;letter-spacing:1px">About Us</a>

            </li>

            <li style="padding-top:5px">

              <i class="layui-icon layui-icon-next" style="font-size:12px"></i>

              <a href="/contact-us/" style="font: 12px/14px arial,helvetica,sans-serif;line-height:14px;color:#ffffff;letter-spacing:1px">Contact Us</a>

            </li>

            <li style="padding-top:5px">

              <i class="layui-icon layui-icon-next" style="font-size:12px"></i>

              <a href="/resources/blog/" style="font: 12px/14px arial,helvetica,sans-serif;line-height:14px;color:#ffffff;letter-spacing:1px">Blog</a>

            </li>

            <li style="padding-top:5px">

              <i class="layui-icon layui-icon-next" style="font-size:12px"></i>

              <a href="/resources/technology/" style="font: 12px/14px arial,helvetica,sans-serif;line-height:14px;color:#ffffff;letter-spacing:1px">Technology</a>

            </li>

            <li style="padding-top:5px">

              <i class="layui-icon layui-icon-next" style="font-size:12px"></i>

              <a href="/resources/downloads/" style="font: 12px/14px arial,helvetica,sans-serif;line-height:14px;color:#ffffff;letter-spacing:1px">Downloads</a>

            </li>

            <li style="padding-top:5px">

              <i class="layui-icon layui-icon-next" style="font-size:12px"></i>

              <a href="/request-a-quote/" style="font: 12px/14px arial,helvetica,sans-serif;line-height:14px;color:#ffffff;letter-spacing:1px">Request A Quote</a>

            </li>

            <li style="padding-top:5px">

              <i class="layui-icon layui-icon-next" style="font-size:12px"></i>

              <a href="/resources/rohs-reach-compliance/" style="font: 12px/14px arial,helvetica,sans-serif;line-height:14px;color:#ffffff;letter-spacing:1px">RoHS & REACH Compliance</a>

            </li>

          </ul>
          <div class='fayoujian'>
            <h2 style="font: 18px arial,helvetica,sans-serif;margin-top: 15px;">LILY Newsletter</h2>
            <p style="font: 12px/14px arial,helvetica,sans-serif;line-height:12px;color:#ffffff;letter-spacing:1px;margin-top: 10px;">Sign up to receive company,product and industry news.</p>
            <div  style="float:left;height:20px;margin-top: 10px;width:100%;">
                <input type="text" name="subscribe_email" id="subscribe_email" placeholder="Enter Email"  autocomplete="off" style="font: 12px/14px arial,helvetica,sans-serif;color:white;border: none;border-bottom: 1px solid #fff;background-color:black;cursor: text;color:white;width:100%;"/>
            </div>
            <button id='gform_submit_button_7' lay-filter="subscribe_formDemo"
                    lay-submit type='button' style="color:white;float: left;margin-left: -20px;margin-top:6px;border: none;background-color: black;"><img src="{:Config::get('app.images_host')}/images/web/rightarrow.png?t={:time()}" style="max-height: 15px;"/></button>
                    </div>
        </div> 

      </div>

    </div>

    <div style="clear:both;"></div> 

  </div>



  <div class="footer-bottom-box" style="background-color:#909799;height:40px;line-height:40px;">

    <div class="layui-container">

      <div class="layui-row" style="padding-bottom: 0px;">

        <div class="footer-bottom" style="width:80%" style="padding-bottom: 0px;">

         

            <div style="font: 12px/14px arial,helvetica,sans-serif;line-height:40px;float:left;letter-spacing:1px">© <?php echo date('Y',time());?> Lily Bearing • All Rights Reserved</div>

            <div style="float:left;margin-left:20px"><a href="/resources/privacy-policy/" style="font: 12px/14px arial,helvetica,sans-serif;line-height:40px;color:#ffffff;letter-spacing:1px">Privacy Policy</a></div>

            <div style="float:left;margin-left:20px"><a href="/resources/terms-conditions/" style="font: 12px/14px arial,helvetica,sans-serif;line-height:40px;color:#ffffff;letter-spacing:1px">Terms Conditions</a></div>
            

            <div style="clear: both;"></div>

         

        </div>

        <div style="clear: both;"></div>

      </div>

    </div>

  </div>

</footer>

<!-- end 脚部 -->
<script src="/static/js/jquery-2.1.4.min.js"></script>
<script src="/static/js/nav.js" type="text/javascript"></script><!--导航js-->
<script src="/static/layui/layui.js" charset="utf-8"></script>
<script src="/static/js/footer.js" type="text/javascript"></script>
<script src="/static/js/footer-us.js?t={:time()}" type="text/javascript"></script>
<script src="/static/js/footer-es.js?t={:time()}" type="text/javascript"></script>


<!-- 站外代码 -->

 <!-- Start of LiveChat (www.livechatinc.com) code -->
<script>
    var online_group_id='';
    function get_dynamic_configuration_group(){
      $.ajax({
        type: 'GET',
        url:"https://api.livechatinc.com/v3.5/customer/action/get_dynamic_configuration?license_id=3911741",
        async:false,
        success:function(res){
          if(res.online_group_ids.length<2){ 
            online_group_id=res.online_group_ids[0];
          }else{
            online_group_id=res.online_group_ids[1];
          }
        }
      });
      return online_group_id;
    }
    online_group_id=get_dynamic_configuration_group();
    window.__lc = window.__lc || {};
    window.__lc.license = 3911741;
    if(online_group_id!='0'){
      window.__lc.group = online_group_id;
    }
    ;(function(n,t,c){function i(n){return e._h?e._h.apply(null,n):e._q.push(n)}var e={_q:[],_h:null,_v:"2.0",on:function(){i(["on",c.call(arguments)])},once:function(){i(["once",c.call(arguments)])},off:function(){i(["off",c.call(arguments)])},get:function(){if(!e._h)throw new Error("[LiveChatWidget] You can't use getters before load.");return i(["get",c.call(arguments)])},call:function(){i(["call",c.call(arguments)])},init:function(){var n=t.createElement("script");n.async=!0,n.type="text/javascript",n.src="https://cdn.livechatinc.com/tracking.js",t.head.appendChild(n)}};!n.__lc.asyncInit&&e.init(),n.LiveChatWidget=n.LiveChatWidget||e}(window,document,[].slice))

      function liveChat_lily_click(){ /*主动唤起livechat*/
        LiveChatWidget.call('maximize');
      }
</script>

<noscript><a href="https://www.livechatinc.com/chat-with/3911741/" rel="nofollow">Chat with us</a>, powered by <a href="https://www.livechatinc.com/?welcome" rel="noopener nofollow" target="_blank">LiveChat</a></noscript>
<!-- End of LiveChat code -->

<!--ga代码开始-->
<span style="font-size: 12pt;">
<script async src="https://www.googletagmanager.com/gtag/js?id=G-Z0MD8PGCEB"></script>
<script type="text/javascript">
     function getParam(p){
        var match = RegExp('[?&]' + p + '=([^&]*)').exec(window.location.search);
        return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
    }

    function getIP3(url,k){
      $.ajax({
          url: url,
          timeout : 500, //超时时间设置，单位毫秒
          type : 'get',  
          tryCount : 0,
          retryLimit : 2,
          success:function(ip){
              layui.sessionData('clientIP', {key: k, value: ip});
          },
          error:function(){ //失败处理
            this.tryCount++;
            this.timeout += 500
            if (this.tryCount <= this.retryLimit) {   //try again
              $.ajax(this);
              return;
            }       
          }
        });
    }

    // 获取客户端ip
    function getIPs(backFun){
        var ip_dups = {};
        var RTCPeerConnection = window.RTCPeerConnection
          || window.mozRTCPeerConnection
          || window.webkitRTCPeerConnection;
        var useWebKit = !!window.webkitRTCPeerConnection;
        var mediaConstraints = {
          optional: [{ RtpDataChannels: true }]
        };
        // 这里就是需要的ICEServer了
        var servers = {
          iceServers: [
            { urls: "stun:stun.services.mozilla.com" },
            { urls: "stun:stun.l.google.com:19302" },
          ]
        };
        var pc = new RTCPeerConnection(servers, mediaConstraints);
        function handleCandidate (candidate) {
          var ip_regex = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/
          var hasIp = ip_regex.exec(candidate)
          if (hasIp) {
            var ip_addr = ip_regex.exec(candidate)[1];
            if (ip_dups[ip_addr] === undefined)
            backFun(ip_addr);
            ip_dups[ip_addr] = true;
          }
        }
        // 网络协商的过程
        pc.onicecandidate = function (ice) {
          if (ice.candidate) { 
            handleCandidate(ice.candidate.candidate);
          }
        };
  
        pc.createDataChannel("");
        //创建一个SDP(session description protocol)会话描述协议 是一个纯文本信息 包含了媒体和网络协商的信息 
        pc.createOffer(function (result) { //成功回调
          pc.setLocalDescription(result, function () { }, function () { });
        }, function () {}); //失败回调

        // //延迟，让一切都能完成
        // setTimeout(function () {
        //   var lines = pc.localDescription.sdp.split('\n');
        //   lines.forEach(function (line) {
        //     if (line.indexOf('a=candidate:') === 0)
        //       handleCandidate(line);
        //   });
        // }, 1000);
    }

    // 获取客户端ip
    var clientIP = layui.sessionData('clientIP') || {}
    if(!clientIP.ip){ 
        getIPs(function(ip){
            layui.sessionData('clientIP', {key: 'ip', value: ip});
        })
    }

    setTimeout(function () { //设置 1s 后执行, 超时时间2s
      var clientIP = layui.sessionData('clientIP')
      if(!clientIP.ip){
        url = 'https://ipapi.co/ip/'  //每月30 000, 每天最多1000
        getIP3(url, 'ip')
      }else if(!clientIP.ipv4 && clientIP.ip.indexOf(':')>=0){ //ipv6
        url = 'https://api.ipify.org/' //无限制地使用它（即使您每分钟执行数百万个请求)
        getIP3(url,'ipv4') 
      }
    }, 1000);

    // 从服务端获取客户端ip
    server_ip = "<?php echo request()->ip() ?>"

    setTimeout(function () { // 设置 4s 后执行：getIPs(1s缓冲) + getIP3(3s缓冲)
        ipnumber = ''
        var clientIP = layui.sessionData('clientIP')
        if(clientIP.ip){
          ipnumber = 'C:' + JSON.stringify(clientIP).replace(/"|{|}|/g, '').replace(/ip:|ipv4:/g, '') + ' || ' 
        }
        if(server_ip){
          ipnumber += 'S:' + server_ip
        }

        var send = layui.sessionData('send') //是否已向谷歌发送，避免每打开一个页面就发送一次
        var gclid = getParam('gclid');
        if(gclid!==null){
          window.dataLayer = window.dataLayer || [];
          function gtag(){dataLayer.push(arguments);}
          gtag('js', new Date());
      
          gtag('config', 'G-Z0MD8PGCEB');
          gtag('event', 'page_view', {
            'send_to':  'G-Z0MD8PGCEB',
            'dimension5': ipnumber,
            'gclidd': gclid
          });
        }else if(!send.gtag){ console.log(ipnumber)
          layui.sessionData('send', {key: 'gtag', value: 1});
          window.dataLayer = window.dataLayer || [];
          function gtag(){dataLayer.push(arguments);}
          gtag('js', new Date());
      
          gtag('config', 'G-Z0MD8PGCEB');
          gtag('event', 'page_view', {
            'send_to':  'G-Z0MD8PGCEB',
            'dimension5': ipnumber,
          });
        }
      }, 4000);
    
  </script>

</span>

<script>
  function gtag_report_conversion() {
    gtag('event', 'conversion', { 'send_to': 'AW-1016956908/GBYqCIn4qZMBEOyP9uQD'});
    ga('send','event','LiveChat', 'Chat', 'Group ID: {num}');
  }
  var LC_API=LC_API||{};LC_API.on_chat_started=function(){
    gtag_report_conversion();
    gtag('event', 'conversion', {'send_to': 'AW-10806041590/-OAjCLmvioUDEPa33KAo'});
    uet_report_conversion();
  }
</script>
<script type="text/javascript">function Base64(){_keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";this.encode=function(input){var output="";var chr1,chr2,chr3,enc1,enc2,enc3,enc4;var i=0;input=_utf8_encode(input);while(i<input.length){chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=((chr1&3)<<4)|(chr2>>4);enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64}else{if(isNaN(chr3)){enc4=64}}output=output+_keyStr.charAt(enc1)+_keyStr.charAt(enc2)+_keyStr.charAt(enc3)+_keyStr.charAt(enc4)}return output};this.decode=function(input){var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(i<input.length){enc1=_keyStr.indexOf(input.charAt(i++));enc2=_keyStr.indexOf(input.charAt(i++));enc3=_keyStr.indexOf(input.charAt(i++));enc4=_keyStr.indexOf(input.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;output=output+String.fromCharCode(chr1);if(enc3!=64){output=output+String.fromCharCode(chr2)}if(enc4!=64){output=output+String.fromCharCode(chr3)}}output=_utf8_decode(output);return output};_utf8_encode=function(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c)}else{if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128)}else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128)}}}return utftext};_utf8_decode=function(utftext){var string="";var i=0;var c=c1=c2=0;while(i<utftext.length){c=utftext.charCodeAt(i);if(c<128){string+=String.fromCharCode(c);i++}else{if((c>191)&&(c<224)){c2=utftext.charCodeAt(i+1);string+=String.fromCharCode(((c&31)<<6)|(c2&63));i+=2}else{c2=utftext.charCodeAt(i+1);c3=utftext.charCodeAt(i+2);string+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));i+=3}}}return string}};</script>
<script type="text/javascript">
	var cb=function(){
		var l=document.createElement("link");
		l.rel="stylesheet";
		// l.href="https://www.lily-bearing.com/wp-content/themes/theme/front/dist/styles/font-awesome.min.css";
		var h=document.getElementsByTagName("head")[0];
		h.parentNode.insertBefore(l,h)};
		var raf=requestAnimationFrame||mozRequestAnimationFrame||webkitRequestAnimationFrame||msRequestAnimationFrame;
		if(raf){raf(cb)}else{window.addEventListener("load",cb)};
</script>
<script type="text/javascript">
    $(function(){
        var cartloaded = false;
        $("#order_num_change_img").hover(function(){
            if(!cartloaded){
                $.ajax({
                    url: "{:url('/payment/Addorder/order_ajax')}",/*传向后台服务器文件*/
                    type: 'POST',    /*传递方法 */
                    dataType: 'json',  //传递数据的格式
                    async: true, //这是重要的一步，防止重复提交的
                    cache: false,  //设置为false，上传文件不需要缓存。
                    contentType: false,//设置为false,因为是构造的FormData对象,所以这里设置为false。
                    processData: false,//设置为false,因为data值是FormData对象，不需要对数据做处理。

                    success: function (res){
                        if(res.status==1){
                            var h = '';
                            h += '<div class="ordernotiflines">';
                            $.each(res.cookiedata,function (index,el){
                                h += '<a class="product-link" href="'+el.url+'"><div class="product-body">';
                                h += '<div class="product-image"><img style="width: 50px;height: 45px;" src="'+el.img+'" alt="product-image"></div>';
                                h += '<div class="product-name-and-desc"><div class="product-name">'+el.Product_Number+'</div></div>';
                                h += '<div class="product-quantity">'+el.Price+'</div>';
                                h += '<div class="product-quantity">'+el.num+'</div>';
                                h += '</div></a>';
                            });
                            h += '</div><div class="view-order"><a href="/order/">View Order</a></div>';
                            $(".wrapper-ordernotiflines").empty();
                            $(".wrapper-ordernotiflines").append(h);
                            cartloaded = true;
                        }
                    }
                });
            }
            if(cartloaded) {
                $(".wrapper-ordernotiflines").show();
            }
            return false;
        },function (){
            if(cartloaded) {
                $(".wrapper-ordernotiflines").hide();
            }
        });
        $(".wrapper-ordernotiflines").hover(function (){
            if(cartloaded){
                $(".wrapper-ordernotiflines").show();
            }
        },function (){
            if(cartloaded){
                $(".wrapper-ordernotiflines").hide();
            }
        })
    });
</script>
<script>
  var userip=<?php echo "'".$base_data['ip']."'";?>;
  $(".email").click(function(){ ga('send','event','PC_Email','click::Email','Email');});
  $(".logo").click(function(){ ga('send','event','PC_topnavigation','click::logo','nav_logo')});

  $("#gform_submit_button_1").click(function(){
    var names=$.trim($("input[name='name']").val());
    var emails=$.trim($("input[name='email']").val());
    var b=new Base64();
    ga('send','event','PC_Request A Quote','Submit',{'dimension1':b.encode(names),'dimension2':b.encode(emails),'ipnum':userip})
  });

  $("#gform_submit_button_2").click(function(){
    var names=$.trim($("input[name='name']").val());
    var emails=$.trim($("input[name='email']").val());
    var b=new Base64();
    ga('send','event','PC_Request A Quote','Submit',{'dimension1':b.encode(names),'dimension2':b.encode(emails),'ipnum':userip})
  });

  $("#gform_submit_button_3").click(function(){
    var names=$.trim($("input[name='name']").val());
    var emails=$.trim($("input[name='email']").val());
    var b=new Base64();
    ga('send','event','PC_Request A Quote','Submit',{'dimension1':b.encode(names),'dimension2':b.encode(emails),'ipnum':userip});
    console.log(userip);
  });

  $("#gform_submit_button_4").click(function(){
    var names=$.trim($("input[name='name']").val());
    var emails=$.trim($("input[name='email']").val());
    var company=$.trim($("input[name='company']").val());
    var country=$.trim($("select[name='country'] option:selected").val());
    var main_products=$.trim($("input[name='main_products']").val());
    var comments=$.trim($("textarea[name='comments']").val());
    var b=new Base64();
    ga('send','event','PC_Request A Quote','Submit',{'dimension1':b.encode(names),'dimension2':b.encode(emails),'dimension3':b.encode(company),'dimension4':b.encode(country),'dimension5':b.encode(main_products),'dimension6':b.encode(comments),'ipnum':userip})
  });

  $("#gform_submit_button_5").click(function(){
    var names=$.trim($("input[name='name']").val());
    var numbers=$.trim($("input[name='phone']").val());
    var emails=$.trim($("input[name='email']").val());
    var b=new Base64();
    ga('send','event','PC_Request A Quote','Submit',{'dimension1':b.encode(names),'dimension2':b.encode(emails),'dimension3':b.encode(numbers),'ipnum':userip})
  });
  $("#gform_submit_button_6").click(function(){
      var names=$.trim($("input[name='footer_name']").val());
      var emails=$.trim($("input[name='footer_email']").val());
      var numbers=$.trim($("input[name='footer_phone']").val());
      var comments=$.trim($("textarea[name='footer_comments']").val());
      var b=new Base64();
      ga('send','event','PC_Request A Quote','Submit',{'dimension1':b.encode(names),'dimension2':b.encode(emails),'ipnum':userip})
  });
  $("#gform_submit_button_7").click(function(){

      var emails=$.trim($("input[name='subscribe_email']").val());
      var b=new Base64();
      ga('send','event','PC_Request Subscribe Email','Submit',{'dimension1':b.encode(emails),'ipnum':userip})
  });

  var stop=0;$(".menu-item").click(function(){var classchar=$(this).attr('class');if(stop==0){classchar=classchar.substr(classchar.length-5,5);dada(classchar)}stop=1});var stop1=0;$(".cat-item").click(function(){if(stop1==0){var arr1=new Array('Ball Bearings','Ceramic Bearings','Needle Roller Bearings','inless Steel Bearings','Tapersd Roller Bearings','Custom Bearings');var v1=$(this).find("a").first().html();var aa=arr1.indexOf(v1);if(aa>=0){ga('send','event','PC_rightonlinecatalog',v1,'Lv1_'+v1)}else{var v2=$(this).parents('.current-cat-ancestor').find("a").first().html();var ll=3;if($(this).children('ul').length!=0||$(this).parent('.current-cat-parent').length!=0||$(this).parent('.current-cat-ancestor').length!=0){var ll=2}if(!v2){var v2=$(this).parents('.current-cat').find("a").first().html();var ll=2}ga('send','event','PC_rightonlinecatalog',v2,'Lv'+ll+'_'+v1)}}stop1=1});

  </script>
<script type="text/javascript">
    layui.use('form', function(){
        var form = layui.form;

        form.on('submit(footer_formDemo)', function(data){
            var index = layer.load(1, { shade: [0.1,'#fff'] });
            var name=$.trim($("input[name='footer_name']").val());
            var email=$.trim($("input[name='footer_email']").val());
            var phone=$.trim($("input[name='footer_phone']").val());
            var code = $.trim($("input[name='footer_code']").val());
            var comments=$.trim($("textarea[name='footer_comments']").val());
            var company='';
            var Product_Number='';

            var lasturl=<?php if(isset($_SERVER['HTTP_REFERER'])){ echo "'".$_SERVER['HTTP_REFERER']."'";}else{echo "'"."'";}?>;/*上一个页面的url 不能在ajax里面书写这样就多了一层页面关系*/
            var nowurl=window.location.href;/*当前页面url*/
            var formData = new FormData();
            formData.append('name', name);
            formData.append('email', email);
            formData.append('phone', phone);
            formData.append('comments', comments);
            formData.append('lasturl', lasturl);
            formData.append('nowurl', nowurl);
            formData.append('code', code);
            formData.append('Product_Number', Product_Number);
            formData.append('company', company);

            $.ajax({
                url: "{:url('index/xunpan/send_inquiry')}",/*传向后台服务器文件*/
                type: 'POST',    /*传递方法 */
                data: formData,  /*要带的值，在这里只能带一个formdata ，不可以增加其他*/
                dataType: 'json',  //传递数据的格式
                async: true, //这是重要的一步，防止重复提交的
                cache: false,  //设置为false，上传文件不需要缓存。
                contentType: false,//设置为false,因为是构造的FormData对象,所以这里设置为false。
                processData: false,//设置为false,因为data值是FormData对象，不需要对数据做处理。

                success: function (res){
                    if(res.status==1){
                        layer.closeAll('loading');
                        $(".layui-form input").each(function(){
                            $(this).val('');
                        })
                        $(".layui-textarea").val('');
                        $('#successfullyfrom_footer').css('display','block');
                        return false;
                    }else{
                        layer.closeAll('loading');
                        if(res.name!='no'){
                            layer.tips(res.msg, '#'+res.name.replace("form","footer_"), {
                                tips: [1, '#5FB878'],
                                area: ['200px', 'auto']
                            });
                        }else{
                            layer.msg(res.msg, {
                                time: 2000,
                                icon: 5
                            });
                        }
                    }
                }
            });

            return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });
    })
</script>
<script type="text/javascript">
    layui.use('form', function(){
        var form = layui.form;

        form.on('submit(subscribe_formDemo)', function(data){
            var email=$.trim($("input[name='subscribe_email']").val());
            var formData = new FormData();
            formData.append('email', email);

            $.ajax({
                url: "{:url('index/xunpan/subscribe_email')}",/*传向后台服务器文件*/
                type: 'POST',    /*传递方法 */
                data: formData,  /*要带的值，在这里只能带一个formdata ，不可以增加其他*/
                dataType: 'json',  //传递数据的格式
                async: true, //这是重要的一步，防止重复提交的
                cache: false,  //设置为false，上传文件不需要缓存。
                contentType: false,//设置为false,因为是构造的FormData对象,所以这里设置为false。
                processData: false,//设置为false,因为data值是FormData对象，不需要对数据做处理。

                success: function (res){
                    if(res.status==1){
                        layer.closeAll('loading');
                        $("input[name='subscribe_email']").val('');
                        $('#successfullyfrom_footer').css('display','block');
                        return false;
                    }else{
                        layer.closeAll('loading');
                        if(res.name!='no'){
                            layer.tips(res.msg, '#'+res.name, {
                                tips: [1, '#5FB878'],
                                area: ['200px', 'auto']
                            });
                        }else{
                            layer.msg(res.msg, {
                                time: 2000,
                                icon: 5
                            });
                        }
                    }
                }
            });

            return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });
    })
    function close_successfullyfrom_footer(){
        $('#successfullyfrom_footer').css('display','none');
    }
</script>



  </body>

</html>